//
//  NSString+ZMAdd.h
//  ZMKitDemo
//
//  Created by zm on 2018/6/13.
//  Copyright © 2018年 zm. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface NSString (ZMAdd)

#pragma mark - 加密
- (NSString *)zm_md5;
- (NSString *)zm_base64Encode;
- (NSString *)zm_base64Decode;

#pragma mark - Size
- (CGSize)zm_textSizeWithViewSize:(CGSize)size font:(UIFont *)font;
- (CGSize)zm_textSizeWithViewSize:(CGSize)size font:(UIFont *)font lineSpace:(CGFloat)lineSpace;

#pragma mark - Check
- (BOOL)zm_isEmpty;
- (BOOL)zm_isAllNumber;
- (BOOL)zm_isContainsEmoji;
- (BOOL)zm_isEmail;

/**
 以给定字符串开始,忽略大小写
 */
- (BOOL)zm_startsWith:(NSString *)str;

/**
以指定条件判断字符串是否以给定字符串开始
 */
- (BOOL)zm_startsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions;

/**
以给定字符串结束，忽略大小写
 */
- (BOOL)zm_endsWith:(NSString *)str;

/**
 以指定条件判断字符串是否以给定字符串结尾
 */
- (BOOL)zm_endsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions;

/**
 包含给定的字符串, 忽略大小写
 */
- (BOOL)zm_containsString:(NSString *)str;

/**
 以指定条件判断是否包含给定的字符串
 */
- (BOOL)zm_containsString:(NSString *)str Options:(NSStringCompareOptions)compareOptions;

/**
 判断字符串是否相同，忽略大小写
 */
- (BOOL)zm_equalsString:(NSString *)str;

#pragma mark - PingYin
/**
 拼音首字母
 */
- (NSString*)zm_firstPinYin;
/**
 转拼音
 */
- (NSString *)zm_pinyinString;

#pragma mark - URL
- (NSString *)zm_url;

#pragma mark Trim
/**
 是否全是换行和空格
 */
- (BOOL)zm_isWhitespaceAndNewlines;
- (NSString *)zm_trim;
- (NSString *)zm_removeWhiteSpace;
- (NSString *)zm_removeNewLine;
/**
 首字母大写
 */
- (NSString *)zm_capitalize;

@end
